package com.peaksport.pkms.oauth.entity;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.peaksport.framework.base.entity.CoreBaseEntity;
import com.peaksport.framework.uuid.PKEntityType;
import com.peaksport.pkms.permit.entity.UserEntity;

import lombok.Getter;
import lombok.Setter;

@SuppressWarnings("serial")
@Entity
@Table(name = "CT_OAuth_Client")
@Getter
@Setter
public class ClientEntity extends CoreBaseEntity {

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "FUserId")
	private UserEntity user;
	@Column(name="FClientNum", nullable=false,length=80)
	private String clientNum;
	@Column(name = "FClientName", nullable = false, length = 80)
	private String clientName;
	@Column(name = "FClientDesc", length = 255)
	private String clientDesc;
	@Column(name="FIsEnabled")
	private boolean isEnabled = true;

	@Override
	public PKEntityType getEntityType() {
		return PKEntityType.create("23DE176A");
	}

}
